From 5559c461941c128fcaa21155fcb1ae7d2620eaef Mon Sep 17 00:00:00 2001 From: Alastair Tse Date: Thu, 5 Oct 2006 20:02:50 +0100 Subject: [PATCH] [XEND] Another attempt at fixing escaping logic in SXP Signed-off-by: Alastair Tse --- tools/python/xen/xend/sxp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xend/sxp.py b/tools/python/xen/xend/sxp.py index af7cb9c0c2..a9e9adf17f 100644 --- a/tools/python/xen/xend/sxp.py +++ b/tools/python/xen/xend/sxp.py @@ -267,12 +267,13 @@ class Parser: elif c == 'x': self.state.fn = self.state_hex self.state.val = 0 - elif c == '0': + elif c in string.octdigits: self.state.fn = self.state_octal self.state.val = 0 self.input_char(c) else: # ignore escape if it doesn't match anything we know + self.state.parent.buf += '\\' self.pop_state() def state_octal(self, c): -- 2.30.2